# !/usr/bin/python3
# -*- coding: utf-8 -*-

"""
角色和部门关联表模型类
----------------------------------------------------
@Project :   xinhou-openai-framework
@File    :   RoleDept.py
@Contact :   sp_hrz@qq.com

@Modify Time      @Author    @Version    @Desciption
------------      -------    --------    -----------
2023/04/16 22:04  peng.shen   v1.0.0     None
"""

from typing import Optional

from pydantic import BaseModel, Field


class ReqRoleDeptFindSchema(BaseModel):
    """
    角色和部门关联表参数&校验模型
    """

    id: Optional[int] = Field(default=None, title="主键ID", )
    role_id: Optional[int] = Field(default=None, title="角色ID", )
    dept_id: Optional[int] = Field(default=None, title="部门ID", )


class ReqRoleDeptSaveSchema(BaseModel):
    """
    角色和部门关联表参数&校验模型
    """

    role_id: Optional[int] = Field(title="角色ID", )
    dept_id: Optional[int] = Field(title="部门ID", )


class ReqRoleDeptUpdateSchema(BaseModel):
    """
    角色和部门关联表参数&校验模型
    """

    id: int = Field(title="主键ID", )
    role_id: Optional[int] = Field(default=None, title="角色ID", )
    dept_id: Optional[int] = Field(default=None, title="部门ID", )


class ResRoleDeptDetailSchema(BaseModel):
    """
    角色和部门关联表参数&校验模型
    """

    id: Optional[int] = Field(default=None, title="主键ID", )
    role_id: Optional[int] = Field(default=None, itle="角色ID", )
    dept_id: Optional[int] = Field(default=None, title="部门ID", )
